package org.dromara.hm.domain.vo;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.NotBlank;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.translation.annotation.Translation;
import org.dromara.common.translation.constant.TransConstant;
import org.dromara.hm.domain.HmProduct;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;

/**
 * 产品信息视图对象 hm_product
 *
 * @author zy Hu
 * @date 2024-12-15
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = HmProduct.class)
public class HmProductVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 产品id
     */
    @ExcelProperty(value = "产品id")
    private Long productId;

    /**
     * 产品名称
     */
    @ExcelProperty(value = "产品名称")
    private String productName;

    /**
     * 产品规格
     */
    @ExcelProperty(value = "产品规格")
    private String specifications;


    /**
     * 产品类型
     */
    @ExcelProperty(value = "产品类型")
    private String productType;

    /**
     * 是否为商品产品
     */
    @ExcelProperty(value = "是否为商品", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "sys_yes_no")
    private Boolean isCommercialProduct;

    /**
     * 是否为赠品产品
     */
    @ExcelProperty(value = "是否为赠品", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "sys_yes_no")
    private Boolean isGiftProduct; // 新增字段

    /**
     * 上架时间
     */
    @ExcelProperty(value = "上架时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date listingTime;

    /**
     * 购买政策
     */
    @ExcelProperty(value = "购买政策")
    private String purchasePolicy;

    /**
     * 售卖店铺
     */
    private String shopSale;

    /**
     * 售卖店铺名称
     */
    @ExcelProperty(value = "售卖店铺")
    @Translation(type = TransConstant.DEPT_ID_TO_NAME, mapper = "shopSale")
    private String shopSaleDesc;

    /**
     * 状态
     */
    @ExcelProperty(value = "状态")
    private String status;

    /**
     * 备注
     */
    @ExcelProperty(value = "备注")
    private String remark;


}
